%%
% HISTORY:
%
% Daniel Sykora (26.12.2004)
%
% Pavel Tvrdik  (17.12.2004)
%
% Michal Valenta (7.5. 2008)

%preamble declarations

%%%% 7.5.2009
%=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%
\setlength\hoffset{-10pt}
\setlength\voffset{-\baselineskip}
\normalsize
\setlength\textwidth{40em}
%
\setlength\topmargin{0pt}
\setlength\headheight{\baselineskip}
\setlength\headsep{2\baselineskip}
\setlength\topskip{\baselineskip}
\setlength\textheight{45\baselineskip}
\addtolength\textheight{\topskip}       %calc.sty avoided
\setlength\footskip{3\baselineskip}
%
\if@twoside
  \typeout{Two side layout redefined.}
  %
  \setlength\evensidemargin{0pt}
  \setlength\oddsidemargin{37.5pt}
  \setlength\marginparsep{0pt}
  \setlength\marginparwidth{0pt}
\else
  \typeout{One side layout redefined.}
  %
  \setlength\evensidemargin{0pt}
  \setlength\oddsidemargin{19pt}
  \setlength\marginparsep{0pt}
  \setlength\marginparwidth{0pt}
\fi
%=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=%

\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}

\def\ifndef#1{\expandafter\ifx\csname#1\endcsname\relax} % check whether macro is defined




\newcommand\coverpagestarts
{\cleardoublepage
\pagenumbering{roman}\thispagestyle{empty}\setcounter{page}{3}
\begin{center}
\large\rmfamily
\University\\
\Faculty\\
\Department\\
\vglue 10mm
\includegraphics[width=50mm]{../img/LogoCVUT}
\vglue 30mm
{\large \TypeOfWork}\\
\bigskip
{\Large\bf \WorkTitle}\\
\vglue 2mm
{\Large\bf \WorkTitleCZ}\\
\bigskip
\bigskip
{\Large\it \FirstandFamilyName}\\
\vfill
\item[\labelSupervisor:]\ \Supervisor\\
\vglue 15mm
{\labelStudProgram: \StudProgram}\\
\bigskip
{\labelStudBranch: \StudBranch}\\
\bigskip
\today
\end{center}
\newpage
}

\newcommand\mainbodystarts{
\cleardoublepage
\pagestyle{headings}\pagenumbering{arabic}\setcounter{page}{1}
}

%A list of user hyphenations.
\input{hyphen.tex}

%Chapters start at odd pages if you include:
%\newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
% into /usr/lib/texmf/tex/latex/latex/book.cls

%your specific macros

\newcommand{\bcen}{\begin{center}}
\newcommand{\ecen}{\end{center}}
\newcommand{\blem}{\begin{lemma}\sl}
\newcommand{\elem}{\end{lemma}\rm}
\newcommand{\bnote}{\begin{note}\rm}
\newcommand{\enote}{\end{note}}
\newcommand{\bcor}{\begin{corollary}\sl}
\newcommand{\ecor}{\end{corollary}\rm}
\newcommand{\bdefi}{\begin{definition}\rm}
\newcommand{\edefi}{\end{definition}}
\newcommand{\btheo}{\begin{theorem}\sl}
\newcommand{\etheo}{\end{theorem}\rm}
\newcommand{\bprop}{\begin{proposition}\sl}
\newcommand{\eprop}{\end{proposition}\rm}
\newcommand{\bexam}{\begin{example}\rm}
\newcommand{\eexam}{\end{example}}
%
\newcommand{\bfig}{\begin{figure}\begin{center}}
\newcommand{\efig}{\end{center}\end{figure}}
\newcommand{\btab}{\begin{table}\begin{center}}
\newcommand{\etab}{\end{center}\end{table}}
\newcommand{\benum}{\begin{enumerate}}
\newcommand{\eenum}{\end{enumerate}}
\newcommand{\bitem}{\begin{itemize}}
\newcommand{\eitem}{\end{itemize}}
\newcommand{\bflushr}{\begin{flushright}}
\newcommand{\eflushr}{\end{flushright}}
% ceske uvozovky
\chardef\clqq=18 \sfcode18=0
\chardef\crqq=16 \sfcode16=0
\def\uv#1{\clqq#1\crqq}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\acknowledgements}{
\cleardoublepage
\vspace*{\fill}
\noindent
{\huge \textbf{%
\iflanguage{czech}{Aknowledgements}{Aknowledgements}%
}}
\vspace{3ex}\par
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\declaration}[1]{
\cleardoublepage
\vspace*{\fill}
\noindent
{\huge \textbf{%
\iflanguage{czech}{Declaration}{Declaration}%
}}
\vspace{3ex}\par
\noindent
\iflanguage{czech}{%
I declare that the~presented work is prepared individually and that all the~information sources were stated in accordance with the~
Methodical guideline for ethical preparation of university theses.

I understand that rights and obligations arising from the~Act No. 121/2000
Coll., the~Copyright Act, as amended (hereinafter the~“Act”), are applied to my work. I grant non-exclusive permission (license) to use my work in accordance with Section 46, paragraph 6 of the~Act, 
including, but not limited, any computer programs (which are part or annex of the~work) and any documentation (hereinafter collectively the~"Work") 
in favor of any and all persons wishing or intending to use the~Work. These persons are entitled to use the~Work in any manner that does not reduce 
the~value of the~Work for any purpose (including for any commercial purposes). This license is time, quantitatively and territorially unlimited. 
But any person using the~above license of the~Work is obliged to grant a license to use any and each resulting work of which occurs (even in part) 
on the~basis of the~Work, the~adjustment of the~Work, combination of the~Work with other work(s), inclusion of the~Work to any collective work or 
any other processing of the~Works (including any translation of the~Work) at least in the~above-mentioned extent applicable for the~Work and to 
provide access to the~source code of any resulting works at least in a similar and comparable manner and in the~same extent as it is provided to 
the~source code of the~Work.
}{%
\noindent
I declare that the presented work is prepared individually and that all the information sources were stated in accordance with the 
Methodical guideline for ethical preparation of university theses.

I understand that rights and obligations arising from the Act No. 121/2000 Coll., the Copyright Act, as amended (hereinafter the “Act”), 
are applied to my work. I grant non-exclusive permission (license) to use my work in accordance with Section 46, paragraph 6 of the Act, 
including, but not limited, any computer programs (which are part or annex of the work) and any documentation (hereinafter collectively the "Work") 
in favor of any and all persons wishing or intending to use the Work. These persons are entitled to use the Work in any manner that does not reduce 
the value of the Work for any purpose (including for any commercial purposes). This license is time, quantitatively and territorially unlimited. 
But any person using the above license of the Work is obliged to grant a license to use any and each resulting work of which occurs (even in part) 
on the basis of the Work, the adjustment of the Work, combination of the Work with other work(s), inclusion of the Work to any collective work or 
any other processing of the Works (including any translation of the Work) at least in the above-mentioned extent applicable for the Work and to 
provide access to the source code of any resulting works at least in a similar and comparable manner and in the same extent as it is provided to 
the source code of the Work.
}
\\[15mm]
#1 \hfill \hbox to 70mm{\tiny\dotfill}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\abstractpage}{
\cleardoublepage
\noindent
%{\Huge \textbf{Abstract}}
%\vspace{8ex}
\chapter*{Abstract}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% zada kapitolu s Literaturou do obsahu
\def\@openbib@code{\addcontentsline{toc}{chapter}{\bibname}}
